wayland: clean up stride calculation when creating shm surface
authorRay Strode <rstrode@redhat.com>
Wed, 20 Jan 2016 16:40:34 +0000 (11:40 -0500)
committerRay Strode <rstrode@redhat.com>
Wed, 20 Jan 2016 19:29:15 +0000 (14:29 -0500)
commit1e001eaa7874bc00cfc3a2c86e8e40b0fe18c4e5
treec4fb2e353f71c2df6ed7e51db0c20b64bae64620
parentc8deaeabddc0cf8aa16bf118f7a9f61a5a4a59aa
wayland: clean up stride calculation when creating shm surface

Right now, we assume the stride for the image surface needs to
be 4 byte aligned.  This is, in fact, true, but it's better to
ask cairo for the alignment requirement directly rather than
assume we know the alignment rules.

This commit changes the code to use cairo_format_stride_for_width
to calculate a suitable rowstride for pixman.

https://bugzilla.gnome.org/show_bug.cgi?id=760897
gdk/wayland/gdkdisplay-wayland.c